<!DOCTYPE HTML>
<html>
<head>
    {include file='common_header'}
    <title>管理员列表</title>
    <link rel="stylesheet" type="text/css" href="__ACSS__switch-buttons.css">
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 文章发布管理 <span class="c-gray en">&gt;</span> 文章列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href='javascript:location.replace(location.href="{:Url('showlist')}");' title="刷新" >
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray">
        {if condition="$Request.param.del"}
        <a href="javascript:;" onclick="delectCheck('{:Url('deleted')}',$('.item'))" class="btn btn-danger radius">
            <i class="Hui-iconfont">&#xe6e2;</i> 批量彻底删除
        </a>
        <div style="float: right"><a href="?del=0" class="btn btn-success radius"><i class="Hui-iconfont">&#xe6e2;</i> 返回</a></div>
        {else/}
        <span class="l">
        <a href="javascript:;" onclick="delectCheck('{:url('del')}',$('.item'))" class="btn btn-danger radius">
                        <i class="Hui-iconfont">&#xe6e2;</i> 批量删除
                </a>
        <a href="javascript:;" onclick="layer_show('发布文章','{:url('showadd')}','','')" class="btn btn-primary radius">
            <i class="Hui-iconfont">&#xe600;</i> 发布文章
        </a>
        </span>

        <div style="float: right">
            <input type="text" class="input-text" style="width:250px" placeholder="请输入文章标题或者栏目标题" id="keywords" value="{$Think.get.keyword}">
            <button type="button" class="btn btn-success" onclick="reload($('#keywords').val())"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </div>
        {/if}
        <table class="table table-border table-bordered table-hover table-bg">
            <thead>
            <tr>
                <th scope="col" colspan="10">文章列表</th>
            </tr>
            <tr class="text-c">
                <th width="15"><input type="checkbox"></th>
                <th width="80">ID</th>
                <th width="80">文章封面</th>
                <th width="80">文章标题</th>
                <th width="50">所属栏目</th>
                <th width="50">文章类型</th>
                <th width="100">作者</th>
                <th width="50">状态</th>
                <th width="100">时间</th>
                <th width="80">操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="$list" id="v"}
            <tr class="text-c">
                <td>
                      <input type="checkbox" value="{$v->id}" name="" class="item" >
                </td>
                <td>{$v->id}</td>
                <td style="height:50px ">
                    {if condition="$v->cover"}
                       <img src="__UPLOADS__{$v['cover']}" onclick="previewPictures('__UPLOADS__'+'{$v->cover}')" height="50px">
                    {/if}
                </td>
                <td>{$v->title}</td>
                <td>{$v->name}</td>
                <td>{$v->type}</td>
                <td>{$v->author}</td>
                <td class="td-status"  {if condition="$v->id neq 1"}  style="cursor:pointer" onclick="reviewed('{:Url('reviewed')}',{$v->id},{$v->review})"{/if}>
                    {if condition="$v->review eq 1"}
                      <span class="	btn btn-success radius" >已审核</span>
                        {else /}
                     <span class="btn btn-danger radius" >未审核</span>
                    {/if}
                </td>
                <td>{$v->create_time}</td>
                <td>
                    <a title="编辑" href="javascript:;" onclick="layer_show('管理员编辑','{:url('showEdit',array('id'=>$v['id']))}','','')" class="btn btn-warning  radius" style="text-decoration:none">
                        <i class="Hui-iconfont">&#xe6df;</i>
                    </a>
                    <a title="删除" href="javascript:;" onclick="delectOne('{:url('del',array('id'=>$v['id']))}',this)" class="btn btn-danger radius" style="text-decoration:none">
                        <i class="Hui-iconfont">&#xe6e2;</i>
                    </a>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div class="page">
            {$page}
        </div>
    </div>
    <!--_footer 作为公共模版分离出去-->
    {include file='common_footer'}
    <!--/_footer 作为公共模版分离出去-->
</div>
</body>
<script>
    function reload(obj) {
        goUrl('?keyword=' + obj);
    }
</script>
</html>